home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
util
/
virus
/
vc2dm10.lha
/
vc2dm.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1993-03-08
|
2KB
|
47 lines
/*rx*/
/* vc2dm.rexx 1.0 */
/* Script for checking files for viruses from Disk Master II */
OPTIONS RESULTS
parse arg DMpath /*put path/filename into variable DMpath */
address 'Virus_Checker' /*connect with VC's ARexx port */
'checkfile\' || DMpath /*VC ARexx command plus our path/filename */
VCsez= result /*put VC's return value into var VCsez */
'address' DM /*connect with Disk Master's ARexx port */
if VCsez= 'RESULT' then /*If VC has returned no bad news */
/*If a var has nothing put into it, it just contains its own name. */
say 'File OK' /*Print message 'OK' to DM title bar */
else do
address DM 'ScrBack' /*DMII command pushes it's screen back */
call open('STDERR','CON:0/0/500/90/Virus Checker') /*open a window for output*/
call writeln( 'STDERR', '')
call writeln( 'STDERR', '>>>> ALERT <<<<')
call writeln( 'STDERR', '')
call writeln( 'STDERR', VCsez parsfil(DMpath) || '.')
/*Send VC message to window along with filename as processed by parsfil()*/
call writeln( 'STDERR', '')
call writeln( 'STDERR', 'Repair is automatic if file disk not write protected.')
call writeln( 'STDERR', '')
call writeln( 'STDERR', 'PRESS RETURN TO CONTINUE')
parse external waitcall /*bad programming. Makes window wait for CR */
address DM 'ScrBack' /*DMII command pushes it's screen back */
/*DM is having some problems with the previous command. Apologies */
end
exit /*bye bye */
parsfil:
/* This subroutine takes a full path name and hands back just the filename */
parse arg DMpath dev ":" rest /*chop anything before a colon */
do while rest ~= "" /*keep chopping as long as there are slashes */
parse var rest bit "/" rest
end
return bit /*Should be the filename if input wasn't too wierd */